package ACM.meituan;

/**
 * @Author wwk
 * @DATE 2022/8/20 10:28
 */
import  java.util.*;
import java.text.DecimalFormat;
public class third {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();  //>=1
        int m = scanner.nextInt();  // >=1
        DecimalFormat decimalFormat = new DecimalFormat("#.00");
        int[] percentage = new int[n];
        int[] score = new int[n];
        double[] diff = new double[n];
        double sum = 0;
        double sum0 = 0;
        for (int i = 0; i < n; i++) {
            percentage[i] = scanner.nextInt();
        }
        for (int i = 0; i < n; i++) {
            score[i] = scanner.nextInt();
            sum += score[i];
            sum0 += score[i] * 0.01 * percentage[i];
            diff[i] = Double.parseDouble(decimalFormat.format(score[i] * 0.01 *(100 - percentage[i])));
        }
        if(n==m){
            System.out.println(decimalFormat.format(sum));
            return;
        }
        PriorityQueue<double[]> doubles = new PriorityQueue<>((o1, o2) -> (int) (o1[0]-o2[0]));
        //从diff中选出最大的m个,让其为100，其它正常
        for (int i = 0; i < n; i++) {
            doubles.add(new double[]{diff[i],i*1.0});
            if(doubles.size() > m){
                doubles.poll();
            }
        }
        ArrayList<Integer> list = new ArrayList<Integer>();
        for (double[] aDouble : doubles) {
            list.add((int) aDouble[1]);
        }
        double res = 0;
        for (int i = 0; i < n; i++) {
            if(list.contains(i)){
                res += score[i];
            }else{
                res += 0.01 * percentage[i] * score[i];
            }
        }

        System.out.println(decimalFormat.format(res));


    }
}